<?php
namespace Home\Controller;
use Think\Controller;
class SystemController extends CommonController{
	public function way(){
		session("action","User");
		session("menu_id",I('get.menu_id'));
		$this->redirect("Public/index");
	}
	
	Public function systemlog(){
		$log = M("sys_log");
		$count = $log->count();
		$page = new \Think\Page($count,C("PAGE_LIST_ROWS"));
		$show = $page->show();
		$data = $log->order('create_time DESC')->limit($page->firstRow.','.$page->listRows)->select();
		$this->assign("data",$data);
		$this->assign("page",$show);
		$this->assign("empty", emptyhtml("list"));
		$this->display();
	}
	
	public function delete(){
		$sql = "truncate table oa_sys_log";
		M()->query($sql);
	}
    
    public function _empty($name){
    	$this->emptyaction($name);
    }
	
}
?>